package com.lovecanon.jzjl.scheduler;


import com.lovecanon.jzjl.web.service.ReceiveService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class scheduler {
    public  static Logger logger = LoggerFactory.getLogger(scheduler.class);


    @Autowired
    private StringRedisTemplate redisTemplate;

    @Autowired
    private ReceiveService receiveService;
    @Scheduled(cron = "0/1 * * * * ? ")
    public void tesk() {
        redisTemplate.opsForValue().set("d","12312");

        logger.info("定时任务启动");
    }



}
